{% extends 'index.html' %}

{% block title %}添加书籍{% endblock %}
{% block content %}
<table class="table table-striped">
    <thead>
    <tr>
        <th>id</th>
        <th>书名</th>
        <th>出版社</th>
        <th>价格</th>
        <th>ISBN</th>
        <th>上传者</th>
        <th>编辑</th>
        <th>删除</th>
        <th>查看详情</th>
    </tr>
    </thead>
    <tbody>
    {% for book in books %}

    <tr>
        <td>{{ book['book_id'] }}</td>
        <td>{{ book['book_name'] }}</td>
        <td>{{ book['publisher_name'] }}</td>
        <td>{{ book['price'] }}</td>
        <td>{{ book['isbn_number'] }}</td>
         <td>{{ book['uploader_name'] }}</td>
        <td><a class="btn btn-warning btn-sm"   >编辑</a></td>
        <td><a href="/book/delete/{{ book['book_id'] }}" class="btn btn-danger btn-sm">删除</a></td>
         <td><a href="/book/detail/{{ book['book_id'] }}" class="btn btn-success btn-sm">查看图书详情</a></td>
    </tr>
    {% endfor %}
    </tbody>
</table>

{% endblock %}